#ifndef OBJLOADER_H
#define OBJLOADER_H

#include <windows.h>
#include <gl/glut.h>	/* this includes the others */
#include <stdio.h>
#include <vector>
#include <string>

struct cObjVertex {
	cObjVertex(float f1, float f2, float f3): x(f1), y(f2), z(f3) {}
	float x, y, z;
};

struct cObjNormal {
	cObjNormal(float f1, float f2, float f3): x(f1), y(f2), z(f3) {}
	float x, y, z;
};

struct cObjTexCoord {
	cObjTexCoord(float f1, float f2): u(f1), v(f2) {}
	float u, v;
};

struct cObjFace {
	std::vector<int> vertex;
	std::vector<int> normal;
	std::vector<int> texCoord;
};

struct cObjModel {
		std::vector<cObjVertex> vertex;
		std::vector<cObjNormal> normal;
		std::vector<cObjTexCoord> texCoord;
		std::vector<cObjFace> face;
};

struct cObjLoader {
		bool loadObj(std::string file, cObjModel *m);
};

extern cObjLoader objLoader;

#endif // OBJLOADER_H